# -*- coding: utf-8 -*-#
#-------------------------------------------------------------------------------
# 建立者:        潘炎珍  
# Name:         demo13
# Description:
# Author:       98745
# Date:         2019/3/4
#-------------------------------------------------------------------------------

class F:
    def __init__(self):
        self.a=0
        self.b=1
    def __next__(self):
        result=self.a
        self.a,self.b=self.b,self.a+self.b
        if result>500:
            raise StopIteration
        return result
    def __iter__(self):
        return self
f1=F()
print(list(f1))
f2=F()
for fs in f2:
    print(fs,end=' ')